{strip}
<img src="_tvs_system_core_/design/images/tree2/base.gif" align="absmiddle" alt="" /> <a href="index.php?admin=1&id=0" target="_parent">{$smarty.session.lang}</a>
<ul>

{if $smarty.session.data_path}
	{if $data.path != $data_path && $data.path.0 != ''}
		{assign var="data_path" value=$data.path}
		{assign_session var="data_path" value=$data.path}
	{else}
		{if $xxx == 1}
		{assign var="data_path" value=$smarty.session.data_path}
		{else}
		{unset_session var="data_path"}
		{/if}
	{/if}
{else}
	{assign var="data_path" value=$data.path}
	{assign_session var="data_path" value=$data.path}
{/if}

{assign var="last_parent" value=""}
{ext->get_page_permision_advanced user=$smarty.session.login_user assign="list_of_denied"}
{foreach from=$tree item="el" name="tree" key="key"}
{assign var="selected" value=0}
{if !$list_of_denied[$el.id]}
  {if $el.parent.id==0 || $smarty.session.tree_session[$el.parent.id]}
  {ext->tree_get_childs array=$tree id=$el.id assign="ctree"}
  {if $last.parent.id!=$el.parent.id}</ul><ul style="margin-left: {$el.depth*20}px;">{/if}
  {assign var='depth' value=$el.depth}
  <li>
  <img src="_tvs_system_core_/design/images/tree2/
  {if $ctree}
    {if $smarty.session.tree_session[$el.id]}
      minus
    {else}
      plus
    {/if}
  {else}
    join
  {/if}
  .gif"{if $ctree} onclick="xajax_xajax_tree({$el.id},{$el.depth});"{else} style="cursor: default;"{/if} align="absmiddle" alt="" /> <img src="_tvs_system_core_/design/images/tree2/{if $el.type=="folder01"}folder{else}page{/if}.gif" align="absmiddle" alt="" /> <a href="index.php?admin=1&id={$el.id}" target="_parent"{if $data_path.$depth.id==$el.id} style="font-weight: bold;"{/if}>{$el.name}</a>
  </li>
  {assign var="last_parent" value=$el.parent}
  {assign var="last" value=$el}
  {/if}
{/if}
{/foreach}
</ul>
{/strip}